﻿using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

// Token: 0x020001D0 RID: 464
public class CutSceneEdit_Key : MonoBehaviour
{
	// Token: 0x06000C0B RID: 3083 RVA: 0x000461C4 File Offset: 0x000443C4
	private void Awake()
	{
		this.toggle = base.GetComponent<Toggle>();
	}

	// Token: 0x06000C0C RID: 3084 RVA: 0x000461D4 File Offset: 0x000443D4
	public void Setup(CutSceneEdit_TimeBar timeBar, int id, float time)
	{
		this.timeBar = timeBar;
		this.keyID = id;
		this.time = time;
	}

	// Token: 0x06000C0D RID: 3085 RVA: 0x000461EC File Offset: 0x000443EC
	public void AddAction(CutAction act)
	{
		this.actions.Add(act);
	}

	// Token: 0x06000C0E RID: 3086 RVA: 0x000461FC File Offset: 0x000443FC
	public void DragBegin(BaseEventData data)
	{
		PointerEventData pointerEventData = data as PointerEventData;
		if (pointerEventData.button == PointerEventData.InputButton.Right)
		{
			this.timeBar.BeginKeyDrag(this.keyID);
		}
	}

	// Token: 0x06000C0F RID: 3087 RVA: 0x00046230 File Offset: 0x00044430
	public void DragEnd(BaseEventData data)
	{
		this.timeBar.EndKeyDrag(this.keyID);
	}

	// Token: 0x06000C10 RID: 3088 RVA: 0x00046244 File Offset: 0x00044444
	public void ChangeActionTime(float time)
	{
		foreach (CutAction cutAction in this.actions)
		{
			cutAction.time = time;
		}
	}

	// Token: 0x04000C37 RID: 3127
	public CutSceneEdit_TimeBar timeBar;

	// Token: 0x04000C38 RID: 3128
	public Toggle toggle;

	// Token: 0x04000C39 RID: 3129
	private int keyID = -1;

	// Token: 0x04000C3A RID: 3130
	public float time = -1f;

	// Token: 0x04000C3B RID: 3131
	private List<CutAction> actions = new List<CutAction>();
}
